package com.power.leopard.config.file;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

import com.power.leopard.config.AbstractConfigManager;
import com.power.leopard.config.ConfigManager;

public class PropertiesFileConfigManager extends AbstractConfigManager implements ConfigManager {

	private static final String ENV_FILE = "/data/leopard_config";

	public void init() {
		Properties properties = new Properties();
		try {
			properties.load(new FileInputStream(ENV_FILE));

		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static void main(String[] args) {
		new PropertiesFileConfigManager().init();
	}

	public String getAppName() {
		return get("app.name", "");
	}
}
